import { request } from "@/utils";
import { AxiosPromise } from "axios";


type TokenRes = {
   data:{
    token:string,
    refresh:string,
    message:string
   }
}
function loginApi(mobile:string,code:string):AxiosPromise<TokenRes> {
    return request({
        url:'/authorizations',
        method:'post',
        data:{
          mobile,
          code
        }
    })
}

export { loginApi}